package alkaid.eis.schedule.controller;

import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import alkaid.eis.schedule.domain.JobInfo.State;
import lombok.Data;

/**
 * 任务信息传输对象
 *  
 * @author Lucky Yang
 * @since 0.0.1
 */
@Data
public class JobInfoDto {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private Integer version;
    private String createBy;
    private String updateBy;
    private Date createTime;
    private Date updateTime;
 

    private String className;
    private String methodName;
    private String methodParams;
    private String cronExpression;
    private String remark;
    private Boolean enabled;
    private State state;
   

    public JobInfoDto() {
    }

    public JobInfoDto(String className, String methodName, String methodParams, String cronExpression, String remark) {
        this.className = className;
        this.methodName = methodName;
        this.methodParams = methodParams;
        this.cronExpression = cronExpression;
        this.remark = remark;
        this.enabled = true;
        this.state = State.STOPPED;
    }  

    
}
